// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

// common.scss
import "@/styles/common.scss";


// 测试接口函数
// import { getCategory } from '@/apis/testAPI'
// getCategory().then(res=>{
//     console.log(res);
// })

const app = createApp(App)
const pinia = createPinia()
// 注册持久化插件
pinia.use(piniaPluginPersistedstate)

// 图片懒加载 自定义指令注册
import { lazyPlugin } from './directives';
app.use(lazyPlugin);

// 引入全局组件
import {componentPlugin} from '@/components'

app.use(pinia)
app.use(router)

app.mount('#app')
